<template>
  <el-card class="box-card" shadow="hover" :body-style="{ padding: '15px 5px 5px 5px' }">
    <template #header>
      <div class="rjfl">
        <span class="rjfl-title">最新更新</span>
        <span class="rjfl-more" @click="gotoRouter('/page/387_0_0_0_1.html',$router)"
          >更多
          
        </span>
      </div>
    </template>
    <div class="gx-rq">
      <div
        class="gx"
        v-for="i in 15"
        :key="i"
        @click="data[i - 1] && gotoDetail(data[i - 1], $router, axios)"
      >
        <template v-if="data[i - 1]">
          <img :src="data[i - 1].icon" />
          <span>{{ data[i - 1].name }}</span>
          <span>{{ data[i - 1].thirdStageName }}</span>
        </template>
        <template v-else>
          <div>&nbsp;</div>
        </template>
      </div>
    </div>
  </el-card>
</template>

<script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router";
const router = ref(useRouter());

defineProps({
  data: {
    type: Array,
    default: () => [],
  },
});

// const it = ref({
//   name: "梦想世界",
//   icon: "https://placeholder.idcd.com/?w=72&h=72&text=72x72",
//   id: "",
// });
</script>

<style lang="less" scoped>
.gx-rq {
  display: flex;
  flex-flow: wrap;
  flex-wrap: row;
  justify-content: center;
  height: 360px;
}
.gx {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 7px;
  width: 100px;
  height: 80px;
  cursor: pointer;
  img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
  }

  &:hover img {
    width: 80px;
    height: 80px;
    transition: all 0.1s;
  }

  span:first-child {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #1d2127;
    line-height: 12px;
  }
  span:last-child {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 400;
    color: #93999e;
    line-height: 10px;
  }
}

@media screen and (max-width: 1366px) {
  .gx {
    width: 90px;
  }
}
</style>
